const os = require('os')
const cpus = os.cpus().length

module.exports = {
  apps: [
    {
      name: 'zl_web',
      script: 'server/index.js',
      env: {
        NODE_ENV: 'development'
      },
      error_file: '/home/logs/node/web_error2.log',
      out_file: '/home/logs/node/web_log2.log',
      kill_timeout: 30000, //测试环境1000重启
      exec_mode: 'cluster',
      //当应用程序达到内存阈值时重新启动
      max_memory_restart: '800M',
      instances: ~~(cpus / 2)
    }
  ]
}
